//
//  ST_PairsCenterMatchloadingCell.swift
//  btvideo
//
//  Created by mac on 2020/9/7.
//  Copyright © 2020 JarvanZhang. All rights reserved.
//

import UIKit
import SwiftyJSON
import SwiftyAttributes
import HandyJSON

class ST_PairsCenterMatchloadingCell: UITableViewCell {
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
           
       super.init(style: style, reuseIdentifier: reuseIdentifier)
       
       self.selectionStyle = .none
   
       contentView.backgroundColor = UIColor.init(hex: 0xACB4C0)
       
       contentView.addSubview(corner_radius_view)
       corner_radius_view.snp.makeConstraints { (make) in
           make.edges.equalToSuperview().inset(UIEdgeInsets.init(top: 3, left: 0, bottom: 0, right: 0))
        }
        
        contentView.addSubview(indicator)
        indicator.snp.makeConstraints { (make) in
            make.center.equalToSuperview()
            make.width.height.equalTo(100)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    fileprivate lazy var indicator:UIActivityIndicatorView = {
        
        let control = UIActivityIndicatorView()
        control.color = .gray
        return control
    }()
    
    fileprivate lazy var corner_radius_view:UIView = {
        let control = UIView()
        control.backgroundColor = Color.white
        control.cornerRadius = 30
        return control
    }()

    
    func startAnimating(){
        
        indicator.startAnimating()
        print("开始00001")
    }
    
    func stopAnimating(){
        
        indicator.stopAnimating()
        
        
        print("结束00001")
    }
    
}


class ST_PairsCenterMatchloadingCellModel: NSObject,ST_CellTypeProtocol {
    
    var cellType: ST_PairsCenterCellType = .loading
    
    var pairsCellHeight: CGFloat = 100
    
}


